/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef LOGR_GEN_INFO_H
#define LOGR_GEN_INFO_H

#include <sys/stat.h>
#include <sys/fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <ctype.h>
#include <sys/time.h>
#include <assert.h>
#include <gr_graph_fun.h>

typedef struct _web_gen_info {
    long naccesses;
    double sbytes;
    long npages;
    void *info;
} WebGenInfoStruct;

typedef struct _web_gen_info *WebGenInfoPtr;

WebGenInfoPtr
new_gen_info_node(void);

void
delete_gen_info_node(WebGenInfoPtr wgi);

void
LOGR_set_gen_info_naccesses(WebGenInfoPtr wgi,long num);

void
LOGR_add_gen_info_naccesses(WebGenInfoPtr wgi,long num);

void
LOGR_inc_gen_info_naccesses(WebGenInfoPtr wgi);

long
LOGR_get_gen_info_naccesses(WebGenInfoPtr wgi);

void *
LOGR_get_gen_info_context(WebGenInfoPtr wgi);

void
LOGR_set_gen_info_context(WebGenInfoPtr wgi,void *info);

void
LOGR_set_gen_info_sizebytes(WebGenInfoPtr wgi,double num);

void
LOGR_add_gen_info_sizebytes(WebGenInfoPtr wgi,double num);

double
LOGR_get_gen_info_sizebytes(WebGenInfoPtr wgi);

void
LOGR_set_gen_info_npages(WebGenInfoPtr wgi,long num);

void
LOGR_add_gen_info_npages(WebGenInfoPtr wgi,long num);

void
LOGR_inc_gen_info_npages(WebGenInfoPtr wgi);

long
LOGR_get_gen_info_npages(WebGenInfoPtr wgi);

int
LOGR_is_access_gen_info_lower(WebGenInfoPtr u, WebGenInfoPtr v);

int
LOGR_is_access_gen_info_bigger(WebGenInfoPtr u,WebGenInfoPtr v);

int
LOGR_is_npages_gen_info_lower(WebGenInfoPtr u, WebGenInfoPtr v);

int
LOGR_is_npages_gen_info_bigger(WebGenInfoPtr u,WebGenInfoPtr v);

int
LOGR_is_context_gen_info_lower(WebGenInfoPtr u, WebGenInfoPtr v);

int
LOGR_is_context_gen_info_bigger(WebGenInfoPtr u,WebGenInfoPtr v);

#endif


